home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gigarom 1
/
Gigarom Macintosh Archives (Quantum Leap)(CDRM1080320)(1993).iso
/
FILES
/
HYP
/
E-G
/
Get-SetVolume.cpt
/
GetVolume.Pas
< prev
next >
Wrap
Pascal/Delphi Source File
|
1989-02-26
|
1KB
|
56 lines
{$R-}
{
GetVolume -- An HyperCard XFCN that will return the volume of the speaker.
Written by Steven Kienle, CIS account number 72330,111
GetVolume should be called in HyperCard as
GetVolume()
The parentheses are required.
After compiling this program, link it with the GetVolume.Link, then use
ResEdit to move the XFCN resource to the appropriate stack. Or use the
GetVolume/SetVolume stack's Install button.
NOTE: for the XCmdGlue.inc file to work with TML Pascal, a few
modifications are required.
}
{$S GetVolume } { Segment name must be the same as the command name. }
UNIT DummyUnit;
INTERFACE
USES MacIntf, HyperXCmd;
PROCEDURE ENTRYPOINT(paramPtr: XCmdPtr);
IMPLEMENTATION
PROCEDURE GetVolume(paramPtr: XCmdPtr); FORWARD;
PROCEDURE ENTRYPOINT(paramPtr: XCmdPtr);
BEGIN
GetVolume(paramPtr);
END;
PROCEDURE GetVolume(paramPtr: XCmdPtr);
VAR
oldVolume : Integer ;
loldVolume : LongInt ;
pasStr : Str255 ;
{$I XCmdGlue.inc }
BEGIN
GetSoundVol (oldVolume) ; { Get the volume }
loldVolume := oldVolume ;
pasStr := NumToStr(loldVolume) ; { Convert number to string }
paramPtr^.returnValue := PasToZero(pasStr) ; { Return the value }
END;
END.